package com.ojoin.trade.t0loan_core.web.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.session.SqlSession;
import org.springframework.data.domain.Pageable;

import com.ojoin.trade.common.exception.BusinessException;
import com.ojoin.trade.common.web.dao.BaseDao;
import com.ojoin.trade.t0loan_core.web.domain.T0LoanCheckAccountInfoVO;
import com.ojoin.trade.t0loan_core.web.domain.T0LoanTransanctionLogInfoVO;
import com.ojoin.trade.t0loan_core.web.domain.TbT0LoanTransanctionLog;

public interface TbT0LoanTransanctionLogDao extends BaseDao<TbT0LoanTransanctionLog> {

	public SqlSession getSqlSession();
	
	public List<T0LoanCheckAccountInfoVO> queryAllT0LoanCheckAccountInfoList(Pageable page) throws BusinessException;
	
	public List<T0LoanCheckAccountInfoVO> queryAllTxLoanCheckAccountInfoList(String operatetype, String mhtno, String startdate, String enddate, String ismhtnosplit, Pageable page) throws BusinessException;
	
	public List<T0LoanCheckAccountInfoVO> queryTotalTxLoanCheckAccountInfo(String operatetype, String mhtno, String startdate, String enddate, Pageable page) 
			throws BusinessException;
	
	public TbT0LoanTransanctionLog queryCreditorInfoFromDebtorMhtNoAndDate(String debtor_mhtno, String creditdate)  
			throws BusinessException;
	
	public List<T0LoanCheckAccountInfoVO> queryT0LoanBalanceInfoListByDebtorMhtno(String mhtno,Pageable page)
			throws BusinessException;
	
	public T0LoanCheckAccountInfoVO queryTxLoanBalanceInfoByDebtorMhtno(String mhtno)
			throws BusinessException;
	
	public List<T0LoanTransanctionLogInfoVO> queryT0LoanTransanctionLogInfoListByDebtorMhtNo(Map param,Pageable pageable)
			throws BusinessException;
	
	public List<T0LoanTransanctionLogInfoVO> queryTxLoanTransanctionLogInfoListByDebtorMhtNo(String debtor_mhtno, String operatetype, Pageable pageable) 
			throws BusinessException;
	
	public List<T0LoanTransanctionLogInfoVO> queryTxLoanTransanctionLogNotCreditInfoList(
			Pageable page, String operatetype) throws BusinessException;
	
	public int updateT0LoanTransanctionLogCreditStatusByID(int logid, int creditstatus, String account_balance_of_i_pay_now_of_creditor) throws BusinessException;
	
    public void lockid(int id)throws BusinessException;

    public void lockTable()throws BusinessException;
    
    public List<T0LoanTransanctionLogInfoVO> queryTxSettlementListByBusidate(String operatetype, String busidate) throws BusinessException;
    
    public T0LoanTransanctionLogInfoVO queryTxSettlementTotalByBusidate(String operatetype, String busidate) throws BusinessException;
    
    public int updateT0LoanTransanctionLogVO(Map<String, Object> paramsmap) throws BusinessException;
    
    /**
     * 查询指定商户未还清的贷款记录集合
     * @param joinuserid
     * @return
     * @throws BusinessException
     */
    public List<TbT0LoanTransanctionLog> queryUnRefundT0LoanTransanctionLogList(int joinuserid) throws BusinessException;
    
    public List<TbT0LoanTransanctionLog> queryUnDrawT0LoanTransanctionLogList(String operatetype, Pageable page) throws BusinessException;
   
}
